<template>
  <div class="contractDraftDetail">
    <div class="aaa">
      <div class="ccui-navigation">
      <el-button
        size="mini"
        type="primary-icon-medium"
        icon="icon-ccui-return"
        @click="handleBack"
        >返回
      </el-button>
      <div class="ccui-navigation-divider" />
      <!-- 面包屑 -->
      <el-breadcrumb
        class="ccui-navigation-crumbs-container"
        separator-class="el-icon-arrow-right"
      >
        <el-breadcrumb-item
          :to="{ path: $store.getters.getBreadcrumb('level1').path }"
          >{{ $store.getters.getBreadcrumb("level1").name }}
        </el-breadcrumb-item>
        <el-breadcrumb-item
          :to="{ path: '/orderManagement/entry/un-submitted' }"
          >订单管理
        </el-breadcrumb-item>
        <el-breadcrumb-item
          :to="{
            path: '/orderManagement/approval/item-list'
          }"
          >订单审批
        </el-breadcrumb-item>
        <el-breadcrumb-item>
          <span>审批</span>
          <span class="ccui-curr-crumb ccui-ml-10" v-if="businessList">
            {{ businessList.orderName }}
          </span>
        </el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    </div>
    <!-- <contractDraftDetail></contractDraftDetail>
    <approvalOperate></approvalOperate> -->
    <div>
      <component :is="currentComponent"></component>
    </div>
    <!-- <contractDraftDetail /> -->
    <approvalOperate />
<!--    <export-qr ref="exportQr"></export-qr>-->
  </div>
</template>

<script>
import contractDraftDetail from "../../orderEntry/views/item-detail";
import contractDraftDetail1 from "../../orderClose/views/item-detail";
import approvalOperate from "@/basa/components/public/approval/approval-operate";
// import exportQr from "@/basa/components/public/exportQr";
export default {
  components: { contractDraftDetail, approvalOperate,contractDraftDetail1 },
  data() {
    return {
      businessList:{},
       currentComponent:'contractDraftDetail'
    };
  },
  mounted(){
    this.businessList =  JSON.parse(sessionStorage.getItem("businessData"))
    let type = this.$route.query.businessBillTypeCode
    if(type == 'S0201'){
        this.currentComponent = 'contractDraftDetail'
    }else{
        this.currentComponent = 'contractDraftDetail1'
    }
    // console.log('businessList',businessList)
  },
  methods:{
    handleBack(){
      this.$router.push(
        // sessionStorage.getItem("fromPath") ||
          "/orderManagement/approval/approved"
      );
    }
  }
};
</script>

<style lang="scss">
.contractDraftDetail {
  .ccui-navigation {
    display: none;
  }
  .el-bottom-guide {
    display: none;
  }
}
.aaa{
  .ccui-navigation {
    display: block;
  }
}
</style>
